package com.wzxy.spider.mengshan.service.impl;

import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wzxy.spider.mengshan.entity.MengshanForum;
import com.wzxy.spider.mengshan.repository.MengshanForumRepository;
import com.wzxy.spider.mengshan.service.IMengshanForumService;
import com.wzxy.wzinfo.service.impl.MyJpaService;

@Service("mengshanFormService")
public class MengshanForumService extends MyJpaService<MengshanForum,Integer> implements IMengshanForumService {

	private MengshanForumRepository mengshanForumRepository;
	
	@Autowired
	public void setMengshanForumRepository(MengshanForumRepository mengshanForumRepository) {
		this.mengshanForumRepository = mengshanForumRepository;
		super.setJpaRepository(mengshanForumRepository);
		super.setJpaSpecificationExecutor(mengshanForumRepository);
	}
	
	@PersistenceContext
	protected EntityManager em;
	
	@Override
	public List<MengshanForum> saveAll(List<MengshanForum> list_t) {
		return mengshanForumRepository.save(list_t);
	}

}
